// CherryMerry ( Mikhail Tomilenko ), Reverse Entertainment, 2021-2024


#include "../Public/Shield.h"

#include <Kismet/KismetMathLibrary.h>
#include "Components/ProgressBar.h"
#include "Components/TextBlock.h"

void UShield::UpdateWidgetInfo(float CurrentShield, float MaxShield)
{
	TextBlock_CurrentShield->SetText(FText::AsNumber(CurrentShield));
	TextBlock_MaxShield->SetText(FText::AsNumber(MaxShield));
	ProgressBar_CurrentShield->SetPercent(UKismetMathLibrary::NormalizeToRange(CurrentShield, 0, MaxShield));
}
